import 'package:flutter/material.dart';

class LoadingPage extends StatefulWidget {
  const LoadingPage({Key key}) : super(key: key);

  @override
  _LoadingPageState createState() => _LoadingPageState();
}

class _LoadingPageState extends State<LoadingPage> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    Future.delayed(Duration(seconds: 3), () {
      Navigator.of(context).pushReplacementNamed("/app");
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          Positioned.fill(
            child: Image.network(
                "https://th.bing.com/th/id/R8cd41de1b16e23d318a97d92d190783a?rik=nd8HD5UWssODhQ&riu=http%3a%2f%2f222.186.12.239%3a10010%2fkj_161112%2f011.jpg&ehk=8Zzz3Qf80jh%2bGCh7fiQ4Q4X8v4h6ycWAT8MXDNZkfAc%3d&risl=&pid=ImgRaw"),
          ),
          Center(
            child: Text(
              "hello Flutter",
              style: TextStyle(
                color: Colors.white,
                fontSize: 20,
                fontWeight: FontWeight.bold,
                decoration: TextDecoration.none,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
